<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Echart入门demo</title>
    <!-- 引入刚刚下载的 ECharts 文件 -->
    <script src="echarts.js"></script>

</head>
<body>
<!-- 为 ECharts 准备一个定义了宽高的 DOM -->
<div id="main" style="width: 600px;height:400px;background-color: #FFECF5">



</div>
<script>
    //1.初始化对象
   var echarts= echarts.init(document.getElementById("main"))

    //2.从官网复制option
   var option = {
        xAxis: {
            type: 'category',
            data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
        },
        yAxis: {
            type: 'value'
        },
        series: [
            {
                data: [150, 230, 224, 218, 135, 147, 260],
                type: 'line'
            },
            {
                data: [5, 6, 80, 120, 110, 120, 220],
                type: 'line'
            },
            {
                data: [300, 310, 400, 120, 110, 120, 220],
                type: 'line'
            }
        ]
    };


    //3.使用echarts实例setOption()
    echarts.setOption(option)

</script>


</body>
</html>